package com.compass.framework.model

import java.io.Serializable

/**
 * Description： 处方药品信息
 * Date:2023/12/27 21:34
 */
data class Drug(
    var drugId: String = "", //药品id
    var num: String ="",  //药品数量
    var unitNum: String = "",//单词药量
    var frequency: String = "",
    var usage: String = "",
    var channel: String = "",
    var explain: String= "",
    var name: String?= "",
    var dosage: String?="",
    var spec: String?="",
    var days: String?="",//用药天苏
    var packingUnit: String?="",
    var type:Int=1,//药品类型 1是成药 2是中药

    var frequencyLabel: String = "",
    var usageLabel: String = "",
    var channelLabel: String = "",
    var specification: String?= "",//规格 展示用的
    var price: Double?=0.0,//计算费用使用
    var isStorage: Boolean?= false,///是否允许销售
    var msg: String?= ""///不允许时文本
):Serializable {

    fun getRemarkString(): String {
        if (explain.isEmpty()) {
            return "暂无"
        }

        return explain
    }

}

/**
 * 药品库存
 */
data class Inventory(
    var result: Boolean= false,///是否允许销售
    var msg: String= ""///不允许时文本
):Serializable


data class ImDrug(
    var drugId: String = "", //药品id
    var num: String ="",  //药品数量
    var name: String?= "",//药品名称

):Serializable